An Application Programming Interface (API) is a particular set of rules and specifications that a software program can follow to access and make use of the services and resources provided by another particular software program that implements that API. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers. -- From Wikipedia: http://en.wikipedia.org/wiki/Api
http://code.google.com/apis/maps/documentation/javascript/basics.html
http://code.google.com/apis/maps/documentation/javascript/tutorial.html
Map object options
ROADMAP
SATELLITE
HYBRID
TERRAIN
specification of where the map should initially be centered
0=global, higher values increasingly local. Limited by map type
Overlay Types documentation
points depicted by specified or defined icons at locations within the map
linear features defined by multiple points with a defined style for the line
closed features defined by multiple points. Supports multi-polygons, and donuts. Line and fill styles may be specified.
Image-based map layers that replace or overlay Google layers - registered to the map coordinates
floating content windows for displaying content defined as HTML, a DOM element, or text string
Grouped display content assigned to a specific layer: KmlLayer, FusionTablesLayer, TrafficLayer, BicyclingLayer
definition of programmatically controlled layers
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps01.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps02.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps03.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps04.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps05.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps06.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps07.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps08.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps09.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps10.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
Styled Maps Documentation | Styled Maps Wizard | YouTube Introductory Video
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/gmaps_styled.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
Fusion Tables Introduction Video - Some particularly relevant sections: Introduction (0:00 - 10:30) | Google Maps API Integration (21:40 - 34:42) | Summary and Links (52:00 - 52:40)
Fusion Tables Documentation/Help
http://karlbenedict.com/nawrs/
Fusion Tables: Merged document info, State bounding boxes, HUC bounding boxes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
Capabilities
OpenLayers = Javascript (by example)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
moveTo function: two controls movedMap Object Options API Reference
Two methods for constructing a new OpenLayers.Map object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
Excerpts from the API documentation
allOverlays{Boolean} Allow the map to function with “overlays” only. Defaults to false. If true, the lowest layer in the draw order will act as the base layer. In addition, if set to true, all layers will have isBaseLayer set to false when they are added to the map.
div{DOMElement|String} The element that contains the map (or an id for that element). If the OpenLayers.Map constructor is called with two arguments, this should be provided as the first argument. Alternatively, the map constructor can be called with the options object as the only argument. In this case (one argument), a div property may or may not be provided. If the div property is not provided, the map can be rendered to a container later using the render method.
layers{Array(OpenLayers.Layer)} Ordered list of layers in the map
tileSize{OpenLayers.Size} Set in the map options to override the default tile size for this map.
projection{String} Set in the map options to override the default projection string this map - also set maxExtent, maxResolution, and units if appropriate. Default is "EPSG:4326".
units{String} The map units. Defaults to 'degrees'. Possible values are 'degrees' (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'.
resolutions{Array(Float)} A list of map resolutions (map units per pixel) in descending order. If this is not set in the layer constructor, it will be set based on other resolution related properties (maxExtent, maxResolution, maxScale, etc.).
maxResolution{Float} Default max is 360 deg / 256 px, which corresponds to zoom level 0 on gmaps. Specify a different value in the map options if you are not using a geographic projection and displaying the whole world.
minResolution{Float}
maxScale{Float}
minScale{Float}
maxExtent{OpenLayers.Bounds} The maximum extent for the map. Defaults to the whole world in decimal degrees (-180, -90, 180, 90). Specify a different extent in the map options if you are not using a geographic projection and displaying the whole world.
minExtent{OpenLayers.Bounds}
restrictedExtent{OpenLayers.Bounds} Limit map navigation to this extent where possible. If a non-null restrictedExtent is set, panning will be restricted to the given bounds. In addition, zooming to a resolution that displays more than the restricted extent will center the map on the restricted extent. If you wish to limit the zoom level or resolution, use maxResolution.
numZoomLevels{Integer} Number of zoom levels for the map. Defaults to 16. Set a different value in the map options if needed.
Layer Object Options API Reference
Common Pattern of Layer Object Creation (varies some depending upon the specific layer type)
1 2 3 4 5 6 | |
id{String}
name{String}
isBaseLayer{Boolean} Whether or not the layer is a base layer. This should be set individually by all subclasses. Default is false
displayInLayerSwitcher{Boolean} Display the layer’s name in the layer switcher. Default is true.
visibility{Boolean} The layer should be displayed in the map. Default is true.
attribution{String} Attribution string, displayed when an OpenLayers.Control.Attribution has been added to the map.
projection{OpenLayers.Projection} or {String} Set in the layer options to override the default projection string this layer - also set maxExtent, maxResolution, and units if appropriate. Can be either a string or an OpenLayers.Projection object when created -- will be converted to an object when setMap is called if a string is passed.
units{String} The layer map units. Defaults to 'degrees'. Possible values are 'degrees'’ (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'.
scales{Array} An array of map scales in descending order. The values in the array correspond to the map scale denominator. Note that these values only make sense if the display (monitor) resolution of the client is correctly guessed by whomever is configuring the application. In addition, the units property must also be set. Use resolutions instead wherever possible.
resolutions{Array} A list of map resolutions (map units per pixel) in descending order. If this is not set in the layer constructor, it will be set based on other resolution related properties (maxExtent, maxResolution, maxScale, etc.).
maxExtent{OpenLayers.Bounds} The center of these bounds will not stray outside of the viewport extent during panning. In addition, if displayOutsideMaxExtent is set to false, data will not be requested that falls completely outside of these bounds.
minExtent{OpenLayers.Bounds}
maxResolution{Float} Default max is 360 deg / 256 px, which corresponds to zoom level 0 on gmaps. Specify a different value in the layer options if you are not using a geographic projection and displaying the whole world.
minResolution{Float}
numZoomLevels{Integer}
minScale{Float}
maxScale{Float}
displayOutsideMaxExtent{Boolean} Request map tiles that are completely outside of the max extent for this layer. Defaults to false.
transitionEffect{String} The transition effect to use when the map is panned or zoomed.
null No transition effect (the default).
resize Existing tiles are resized on zoom to provide a visual effect of the zoom having taken place immediately. As the new tiles become available, they are drawn over top of the resized tiles.
Both Map and Layer Objects have a number of associated functions as well
Get functions.Set functionsSome key issues to be aware of when using the WMS Layer Class:
Sample WMS Layer Object Creation
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/openLayers10_wms01.html
1 2 3 4 5 6 7 | |
Vector layers support
Vector Layer Objects are Typically Defined using three OpenLayers classes
ProtocolConnection protocol for requesting the data that would be provided from an external source
FormatThe OpenLayers supported format of the vector data object
StrategyA specification of how OpenLayers should request the data from the server, and also handle the data within the client (browser).
http://karlbenedict.com/presentations/2014-04-NMGIC/examples/openLayers11_vectorData_KML.html
Sample Point Feature Object creation
1 2 3 | |
Sample KML Layer Object creation
1 2 3 4 5 6 7 8 9 10 11 | |